#ifndef __VERIFY_CORE_H__
#define __VERIFY_CORE_H__

#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/FileHandleLib.h>
#include <Library/PrintLib.h>
#include <Library/DebugLib.h>
#include <Protocol/SimpleFileSystem.h>

// 定义错误代码
#define VERIFY_SUCCESS                     0
#define VERIFY_ERROR_FILE_NOT_FOUND        1
#define VERIFY_ERROR_READ_FAILED           2
#define VERIFY_ERROR_GUID_MISMATCH         3
#define VERIFY_ERROR_MAC_MISMATCH          4
#define VERIFY_ERROR_TIME_EXPIRED          5

// 固定偏移定义
#define CORE_GUID_OFFSET       0x300
#define CORE_MAC_OFFSET        0x370
#define CORE_TIME_OFFSET       0x330
#define CORE_FIRST_TIME_OFFSET 0x3A0
#define CORE_LOAD_OFFSET       0x400

// 固定长度定义
#define GUID_LENGTH          36    // e3ae32b9-5365-409c-84de-aee4ea4771de
#define MAC_LENGTH           17    // 04-7C-16-5A-3A-08
#define TIME_LENGTH          32    // 到期时间长度

// 函数声明
EFI_STATUS
VerifyGuidAndMac (
  VOID
  );

EFI_STATUS
HandleFirstTimeAndExpiration (
  VOID
  );

#endif